package com.hdoit.ares.web.acti.modelconfig;
import com.hdoit.ares.web.acti.providers.ActiStateProvider;
import com.hdoit.ares.web.acti.providers.TaskIdProvider;
import com.hdoit.ares.web.acti.providers.TaskTypeProvider;
import com.hdoit.ares.web.brokerage.providers.ConfirmStateProvider;
import com.hdoit.ares.web.ser.providers.GoodsCurrencyStateProvider;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      caochengmeng
 * @email       
 * @createtime  2018年03月14日 08:55:04
 * @comment
 */
public class ActiTaskConfig extends ModelMetadataAttributeConfiguration{
    public ActiTaskConfig(){
        this.setProperty("taskName")
            .hasAttribute(new DisplayNameAttribute("任务名称"));

        this.setProperty("taskType")
            .hasAttribute(new DisplayNameAttribute("任务类型"))
            .hasAttribute(new DropDownListAttribute(new TaskTypeProvider()));
        
        this.setProperty("taskId")
        	.hasAttribute(new DisplayNameAttribute("任务Id"))
        	.hasAttribute(new DropDownListAttribute(new TaskIdProvider()));

        this.setProperty("reward")
            .hasAttribute(new DisplayNameAttribute("奖励"));
        
        this.setProperty("rewardCurrency")
        	.hasAttribute(new DisplayNameAttribute("奖励币种"))
        	.hasAttribute(new DropDownListAttribute(new GoodsCurrencyStateProvider()));
        
        this.setProperty("taskUrl")
        	.hasAttribute(new DisplayNameAttribute("任务路径"));

        this.setProperty("iconImg")
            .hasAttribute(new DisplayNameAttribute("图标"));

        this.setProperty("taskState")
            .hasAttribute(new DisplayNameAttribute("任务状态"))
            .hasAttribute(new DropDownListAttribute(new ActiStateProvider()));

        this.setProperty("confirmState")
            .hasAttribute(new DisplayNameAttribute("确认状态"))
            .hasAttribute(new DropDownListAttribute(new ConfirmStateProvider()));
        
        this.setProperty("actiUrl")
        	.hasAttribute(new DisplayNameAttribute("活动链接"));
    }
}